import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionServlet; import org.apache.struts.util.MessageResources; import dwarf.MountainMgr; public class AddMountainAction extends Action { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { MountainForm mForm = (MountainForm)form; MountainMgr mm = MgrFactory.getMountainMgr(); mm.Add(mForm.getMountainName(), mForm.getLocation(), mForm.getKingId()); return (mapping.findForward("success")); } }